﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace EWPlatAPP.UControls
{

    /// <summary> 
        /// 重写的TabControl控件 带关闭按钮
        /// </summary>
    public class TabControlNew2 : TabControl
    {
        public TabControlNew2()
        {
            SetStyle
                   (ControlStyles.AllPaintingInWmPaint  //全部在窗口绘制消息中绘图
                   | ControlStyles.OptimizedDoubleBuffer //使用双缓冲
                   , true);
        }
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ExStyle |= 0x02000000;
                return cp;

            }
        }

    }

}
